<template>
	<view>
		<view v-if="showComments.length>0&&mv_url" class="video-box">
			<video id="myVideo" :src="mv_url" :poster="poster" :danmu-list="showComments" enable-danmu="true" danmu-btn
				controls object-fit="fill"></video>
		</view>
		<view class="barrage-ipt">
			<input :value="comment" @input="inputs" type="text" placeholder="发个弹幕聊聊...">
			<view @click="postComment" class="send-btn">
				发送
			</view>
		</view>
		<view class="author-box">
			<view class="avatar-box">
				<view class="avatar-left">
					<image :src="artists.avatar"></image>
					<view class="creator">
						<b>{{artists.name}}</b>
						<view>
							<span>{{formatCount(fansCnt)}}粉丝</span>
							<span>{{artist_data.videoCount}}视频</span>
						</view>
					</view>
				</view>
				<view @click="getFollow(1)" v-if="!is_follow" class="avatar-right">
					+ 关注
				</view>
				<view @click="getFollow(0)" v-else class="avatar-right">
					已关注
				</view>
			</view>
			<view class="title-box">
				<view class="title-icon">
					MV
				</view>
				<view class="title">
					{{mv_data.name}}-{{artists.name}}
				</view>
			</view>
			<view class="count-box">
				<span>{{formatCount(mv_data.playCount)}}次观看</span>
				<span>发行时间：{{mv_data.publishTime}}</span>
			</view>
		</view>

		<view class="rcmd-box">
			<view @click="goPlayMv(item.id)" class="rcmd-item" v-for="item,index in rcmd_mv" :key="index">
				<img :src="item.picUrl"></img>
				<view class="rcmd-right">
					<view class="title">
						{{item.name}}
					</view>
					<span>{{formatCount(item.playCount)}}次观看</span>
				</view>
			</view>
		</view>
	</view>
</template>

<script src="./playmv.js"></script>

<style lang="scss">
	@import "@/pages/playmv/playmv.scss";
</style>